package net.seayan.designpattern4j.singleton;

/**
 * 单例模式
 * 解决线程安全问题版本
 * @ClassName: SingletonFull
 * @author: yanmeng
 * @date:2012-8-29 下午5:27:50
 */
public class SingletonSafe {
	
	private static SingletonSafe singleton=new SingletonSafe();
	private static String singletonInfo;
	
	private SingletonSafe(){
		singletonInfo=System.currentTimeMillis()+"";
	}
	
	public synchronized static SingletonSafe getInstance(){
		return singleton;
	}

	public  String getSingletonInfo() {
		return singletonInfo;
	}
}
